package com.daodway.designpattern.statepattern;

import org.junit.Test;

public class Client {
	@Test
	public  void main(){
		Miner m = new Miner(1,"Bob");
		MinersWife mwife = new MinersWife(2,"Elsa");
		EntityManager.Instace().RegisterEntity(m);
		EntityManager.Instace().RegisterEntity(mwife);
		while(true){
			m.update();
			mwife.update();
			MessageDispatcher.Instance().DispatchDelayedMessage();
			try {
			Thread.sleep(1000);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
	}
	
}
